function GetQueryString(name)
{
     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
     var r = window.location.search.substr(1).match(reg);
     if(r!=null)return  unescape(r[2]); return null;
}

$(document).ready(function(){
    $.ajax({
        url:'/hotFixServer/logreport/getLogByMD5?md5='+GetQueryString("id")+'&page=1&size=100',
        type:"GET",
        cache:false,
        success:function(data){
            for(var i=0;i<data.model['patchlog'].length;i++){
                var id=data.model['patchlog'][i]['id']
                var patchLogTable="<tr id="+data.model['patchlog'][i]['id']+">\r\n"+
                    "<td>"+data.model['patchlog'][i]['patch_md5']+"</td>\r\n"+
                    "<td>"+data.model['patchlog'][i]['brand']+"</td>\r\n"+
                    "<td>"+data.model['patchlog'][i]['model']+"</td>\r\n"+
                    "<td>"+data.model['patchlog'][i]['os']+"</td>\r\n"+
                    "<td>"+data.model['patchlog'][i]['os_alias']+"</td>\r\n"+
                    "<td>"+data.model['patchlog'][i]['abi']+"</td>\r\n"+
                    "<td>"+data.model['patchlog'][i]['error_code']+"</td>\r\n"+
                    "<td>"+data.model['patchlog'][i]['error_info']+"</td>\r\n"+
                    "<td>"+data.model['patchlog'][i]['create_time'].split("T")[0]+"</td>\r\n"+
                    "</tr>"
                $("#patchLogTable").append(patchLogTable);
            }
        }
    });
});

function back(){
	history.go(-1);
}